﻿Imports System.Windows.Forms

Public Class dlgWINDCATS
    
    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        For i As Integer = 0 To 3
            For j As Integer = i + 1 To 4
                If Me.EFlex1.GetData(i + 1, 1) >= Me.EFlex1.GetData(j + 1, 1) Then
                    MessageBox.Show("输入的风速必须由小到大!", "输入错误", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    Exit Sub
                End If
            Next
        Next
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub dlgWINDCATS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.EFlex1.Styles.Alternate.BackColor = Color.FromArgb(216, 228, 248)

        Me.EFlex1.AllowSorting = C1.Win.C1FlexGrid.AllowSortingEnum.None
        Me.EFlex1.AllowResizing = C1.Win.C1FlexGrid.AllowResizingEnum.Columns
        Me.EFlex1.AllowDragging = C1.Win.C1FlexGrid.AllowDraggingEnum.None
    End Sub
End Class
